/*
 * Copyright (c) 2017 5utrip.com. All Rights Reserved.
 */
package com.guoyu.project.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.guoyu.project.model.Article;

/**
 * 文章信息,数据访问类ArticleDao
 *
 * @author: xblibo Fri May 26 15:24:04 CST 2017
 * @version 1.0.0
 */
@Repository
public interface ArticleDao {

    /**
     * 保存Article实体
     *
     * @param article
     */
    public void save(Article article);

    /**
     * 更新Article实体
     *
     * @param article
     */
    public void update(Article article);

    /**
     * 删除Article实体
     *
     * @param articleId
     */
    public void deleteById(int articleId);

    /**
     * 根据id获取Article实体
     *
     * @param articleId
     * @return
     */
    public Article queryById(int articleId);

    /**
     * 根据条件获取Article记录总数
     *
     * @param params
     * @return
     */
    public int queryArticleCount(Map<String, Object> params);

    /**
     * 根据条件获取分页查询Article记录
     *
     * @param params
     * @return
     */
    public List<Article> queryArticles(Map<String, Object> params);

}